package com.andfo.testframework;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;

/**
 * Used to specify that a specific restore file or dbUnit file is required before running the test.
 *
 * User: andfo
 * Date: Jul 20, 2009
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface DependsOnData {

    /**
     * Specify one or many restore files to be run before the test. Restore files will be run before dbUnit files.
     * @return a String array with restore names.
     */
    String[] restoreFile() default {};

    /**
     * Specify multiple dbUnit files. They will be run in sequence AFTER any restore file..
     * @return a String array with dbunit file names.
     */
    String[] dbUnitFile() default {};

    /**
     * If this is true, a DROP DATABASE and CREATE DATABASE will be issued before any script is executed
     * @return
     */
    boolean recreateDb() default false;
}
